/*
 * Su-yun Information Technology, Co.,Ltd CONFIDENTIAL
 *
 * (C) Copyright Su-yun Information Technology, Co.,Ltd. 2021 All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains the property of
 * Su-yun Information Technology, Co.,Ltd. The intellectual property herein
 * are protected by trade secret, patent law or copyright law. Dissemination
 * of this information or reproduction of this material is strictly forbidden
 * unless prior written permission is obtained from Su-yun Information Technology.
 *
 * https://suyunplat.com/
 *
 */
package com.xtiim.battery.discharge.common.api;

/**
 * Enumeration for common REST API response code.
 */
public enum ResultCode implements IErrorCode {
    SUCCESS(200, "Operation is successful."),
    FAILED(500, "System internal failure."),
    BAD_REQUEST(400, "Invalid parameter."),
    UNAUTHORIZED(401, "Unauthenticated."),
    FORBIDDEN(403, "Resource not authorized."),
    NOT_FOUND(404, "Resource not found.");

    private Integer code;
    private String message;

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
